#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long ll;
template <class T>
inline void read(T &ret) {
    char c;
    int sgn;
    if (c = getchar(), c == EOF) return ;
    while (c != '-' && (c < '0' || c > '9')) c = getchar();
    sgn = (c == '-') ? -1:1;
    ret = (c == '-') ? 0:(c - '0');
    while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
    ret *= sgn;
    return ;
}
ll gcd(ll a, ll b) {
    if (b == 0) return a;
    else gcd(b, a % b);
}
int main() {
    ll n;
    read(n);
    ll x = sqrt(n);
    if (x * x == n) x -= 1;
    for (ll i = x; i >= 1; i--) {
        if (n % i == 0) {
            if (gcd(n / i, i) == 1) {
                printf("%lld %lld", i, n / i);
                return 0;
            }
        }
    }
    printf("1 %lld", n);
    return 0;
}

